package chxy.sys.service.impl;

import chxy.sys.model.PointRecord;
import chxy.sys.mapper.PointRecordMapper;
import chxy.sys.service.PointRecordService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author SR.Y
 * @since 2021-03-13
 */
@Service
public class PointRecordServiceImpl extends ServiceImpl<PointRecordMapper, PointRecord> implements PointRecordService {

    @Override
    public boolean create(PointRecord p) {
        return save(p);
    }


    @Override
    public boolean update(PointRecord p) {
        return updateById(p);
    }

    @Override
    public boolean delete(PointRecord p) {

        return removeById(p.getId());
    }

    @Override
    public Page<PointRecord > list(Integer pageSize, Integer pageNum) {
        Page<PointRecord > page = new Page<>(pageNum,pageSize);
        return page(page);
    }
}
